home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
UTILITY2
/
RFDML120.ZIP
/
VMS.SCR
< prev
next >
Wrap
Text File
|
1993-11-08
|
13KB
|
470 lines
;------------------------------------------------------
;
;VMS.SCR --- The script file for VMS
;
;------------------------------------------------------
;
; We begin with the format specifiers to which allow
;the script to identify where the MailId, RealName,
;and Subject texts are in a newly downloaded letter.
;
Format
Subject: $SUBJECT$\n
Subj: $SUBJECT$\n
From: $UID$
From: $UID$"$NAME$"
Endformat
;------------------------------------------------------
;
; Next is a set of aliases which determine various
; items such as where some of the standard commands
; like 'mail' live.
;
;
Alias sendmail 'send/noedit/cc_prompt '
Alias readmail 'mail '
Alias checkformail 'set folder newmail'
Alias saveletter 'extract '
Alias deleteletter 'd '
Alias quitmail 'e'
Alias mailnull '#'
Alias mailshellesc 'spawn '
Alias rm 'del/noconfirm '
Alias logoff 'log'
;
;------------------------------------------------------
;
; The following aliases determine the command to use for
; transfer, and the prompts the upload program will send
; when it's ready to send data. Adjust these to reflect the
; location of sz.exe and rz.exe on your system:
;
Alias sz 'mcr SYS$LOGIN_DEVICE:[yon.bin]sz '
Alias rz 'mcr SYS$LOGIN_DEVICE:[yon.bin]rz -a '
Alias szprompt1 '\n**'
Alias rzprompt1 '\n**'
Alias rzprompt2 '0000'
;------------------------------------------------------
;
; The following aliases determine the various prompts the
; script will look for. The most important one is the
; 'prompt' alias, which will need to be adjusted to match
; the prompt that your VMS host gives.
;
Alias prompt '\n$ '
Alias mailprompt '\nMAIL> '
Alias toprompt '\nTo:'
Alias subjectprompt '\nSubj: '
Alias ccprompt1 'Cc:'
Alias ccprompt2 'CC:'
Alias ccprompt3 'cc:'
Alias havemailprompt '%MAIL-I-SELECTED'
Alias nomailprompt '%MAIL-E-NOTEXIST'
Alias nomailprompt2 '%MAIL-E-NOMSGS'
Alias badaddressprompt '%MAIL-E-NOSUCHUSR'
Alias loginprompt '\nUsername:'
Alias passwdprompt '\nPassword:'
;------------------------------------------------------
;
; The following aliases determine what the script will look
; for to determine that we've successfully logged in
; (banner1-3), and what it will look for to determine that
; we've successfully logged out (logoffbanner1-2)
;
Alias banner1 'Corp'
Alias banner2 'UNAUTHORIZED ACCESS'
Alias banner3 '\nVMS '
Alias logoffbanner1 %loginprompt%
Alias logoffbanner2 'disconnected'
;
;------------------------------------------------------
;
; The following alias determines what intermediate network
; will be assumed. It can be one of the following:
;
; DIRECT Direct connection to the host (default)
; DIRLAT Direct connection to a LAT
; LAT Dialup LAT where you need to give a login
;
Alias connectype DIRECT
;
; The following alias should be set TRUE if your modem
; drops carrier every time you make a connection. This
; alias simply forces the script to wait 2 seconds for
; the connection to settle before starting the script.
;
Alias waitasec FALSE
;
;------------------------------------------------------
;
; Set the following aliases to reflect your LAT's prompt if you
; are connecting through a LAT:
;
Alias latprompt1 'local>'
Alias latprompt2 'Local>'
;
; Set the following alias to be the command which connects your LAT
; to the host
;
Alias hostconnect 'open host'
;
;------------------------------------------------------
; This is the main entry-point for the script, which
; decides which intermediate network will be used to
; connect to the host.
;
Begin START
If %waitasec% Then WAIT_START
If TRUE Then %connectype%
End
Begin WAIT_START
Timeout 2 Goto %connectype%
End
;------------------------------------------------------
; These two states handle connecting to the host
; once we're directly connected to the LAT
;
Begin DIRLAT
Caption 'connected'
Cr
When %latprompt1% Goto LOCAL_PROMPT
When %latprompt2% Goto LOCAL_PROMPT
Timeout 3 Goto START
End
Begin LOCAL_PROMPT
Transmit %hostconnect%
Cr
When %latprompt1% Goto LOCAL_PROMPT
When %latprompt2% Goto LOCAL_PROMPT
When %loginprompt% Goto USERNAME
Timeout 30 Goto GIVE_UP
End
;------------------------------------------------------
; At this point we've seen the host's login prompt, and
; are attempting to log in.
;
Begin USERNAME
Transmit $USERNAME
Cr
When %passwdprompt% Goto PASSWORD
When %loginprompt% Goto USERNAME
Timeout 120 Goto NO_LOGIN
End
Begin PASSWORD
Transmit $PASSWORD
Cr
When %passwdprompt% Goto PASSWORD
When %loginprompt% Goto USERNAME
When %banner1% Goto LOGGED_IN
When %banner2% Goto LOGGED_IN
When %banner3% Goto LOGGED_IN
When %prompt% Goto JUMP_TO_MAIL
Timeout 120 Goto NO_LOGIN
End
Begin LOGGED_IN
Caption 'logged in'
When %prompt% Goto JUMP_TO_MAIL
Timeout 120 Goto NO_LOGIN
End
;------------------------------------------------------
; These states check to see if there is any mail waiting
; by running the host's mail program and looking for
; keywords indicating the presence/absence of mail.
; If there's mail (and the script is in fetch mode),
; then the FETCH_FROM_MAIN_MENU sequence is started.
; If there's no mail, but there are letters to send,
; the SEND_MAIL sequence is started. Otherwise the
; script just logs off.
;
Begin JUMP_TO_MAIL
Transmit %readmail%
Cr
When %mailprompt% Goto CHECK_FOR_MAIL
End
Begin CHECK_FOR_MAIL
Transmit %checkformail%
Cr
When %nomailprompt% Goto NO_MAIL_WAITING
When %havemailprompt% Goto MAIL_WAITING
Timeout 10 Goto RETRY_JUMP
End
Begin RETRY_JUMP
Transmit %readmail%
Cr
When %nomailprompt% Goto NO_MAIL_WAITING
When %havemailprompt% Goto MAIL_WAITING
Timeout 15 Goto GIVE_UP
End
Begin MAIL_WAITING
Caption 'You Have Mail'
If FETCHING Then FETCH_FROM_MAIN_MENU
If MORE_LETTERS Then SEND_BUT_QUIT
When %mailprompt% Goto QUIT_MAIL
Timeout 120 Goto LOG_OFF
End
Begin NO_MAIL_WAITING
Caption 'No Mail'
If MORE_LETTERS Then SEND_MAIL
When %mailprompt% Goto QUIT_MAIL
Timeout 15 Goto GIVE_UP
End
Begin QUIT_MAIL
Transmit %quitmail%
Cr
When %mailprompt% Goto QUIT_MAIL
When %prompt% Goto LOG_OFF
Timeout 15 Goto GIVE_UP
End
Begin SEND_BUT_QUIT
Transmit %quitmail%
Cr
When %mailprompt% Goto SEND_BUT_QUIT
When %prompt% Goto REQUEST_UPLOAD_LETTER
Timeout 15 Goto GIVE_UP
End
;------------------------------------------------------
; These states execute for each letter to be downloaded.
; They save the letter to the mail.tmp file, download
; the file, instruct RFD to put the letter in the In Box,
; delete the letter on the host, then check for more mail.
;
Begin FETCH_FROM_MAIN_MENU
ClearIndex
NextIndex
When %mailprompt% Goto DEL_TMPFILE
Timeout 20 Goto DEL_TMPFILE
End
Begin DEL_TMPFILE
Transmit %mailshellesc%
Transmit %rm%
Transmit $LETTER.FILENAME
Transmit ';*'
Cr
When %mailprompt% Goto SELECT_LETTER
Timeout 20 Goto SELECT_LETTER
End
Begin SELECT_LETTER
Transmit 'current'
Cr
When %mailprompt% Goto SAVE_CURLETTER
When %nomailprompt2% Goto NO_MORE_MAIL
Timeout 20 Goto SAVE_CURLETTER
End
Begin SAVE_CURLETTER
Transmit %saveletter%
Transmit $LETTER.FILENAME
Cr
When %mailprompt% Goto REQUEST_DOWNLOAD
Timeout 10 Goto REQUEST_DOWNLOAD
End
Begin REQUEST_DOWNLOAD
Caption 'Fetching Mail'
Transmit %mailshellesc%
Transmit %sz%
Transmit $LETTER.FILENAME
Cr
When %szprompt1% Goto DOWNLD_LETTER
Timeout 20 Goto ABORT_DOWNLD
End
Begin ABORT_DOWNLD
Control X
Control X
Control X
Control X
Control X
Control X
Control X
Control C
When %prompt% Goto JUMP_TO_MAIL
When %mailprompt% Goto REQUEST_DOWNLOAD
Timeout 200 Goto JUMP_TO_MAIL
End
Begin DOWNLD_LETTER
Download ZMODEM Then DOWNLD_SUCCESS Else GIVE_UP
End
Begin DOWNLD_SUCCESS
Confirm LETTER.RECEIVED Successful
Caption 'Letter Received'
When %mailprompt% Goto DELETE_LE